import {BasicColumn} from "@/components/Table";

export const columns:BasicColumn[] = [
  {
    title: 'ID',
    key: 'id',
    width:50
  },
  {
    title: '用户名',
    key: 'name',
  },
 /* {
    title: '密码',
    key: 'password',
    editComponent: 'NInput',
    editComponentProps:{
      type:'password',
      clearable:true,
      minlength:6,
      placeholder:'请输入新密码',
      status:null
    },
    ellipsis: false,
    edit: true,
    editRow: true,
  },*/
  {
    title: '姓名',
    key: 'realName',
    editComponent: 'NInput',
    // 默认必填校验
    editRule: true,
    edit: true,
    editRow: true,
  },
  {
    title: '用户角色',
    key: 'manager',
    edit: true,
    editRow: true,
    editComponent: 'NSelect',
    ellipsis: false,
    editComponentProps: {
      options: [
        {
          label: '普通用户',
          value: false,
        },
        {
          label: '管理员',
          value: true,
        },
      ],
    },
  },
  {
    title: '角色描述',
    key: 'desc',
    editComponent: 'NInput',
    // 默认必填校验
    editRule: true,
    edit: true,
    editRow: true,
  },
];
